package com.moyun.finance.repository;

import com.moyun.finance.entity.Receivables;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface ReceivablesRepository extends JpaRepository<Receivables,String>, JpaSpecificationExecutor<Receivables> {
    List<Receivables> findByContractIdOrderByReceivablesDate(String contractId);
    List<Receivables> findByCompanyId(String companyId);
    List<Receivables> findByCompanyIdAndStateAndSurplusMoneyGreaterThan(String companyId, int state, double surplusMoney);

}
